import request from '@/utils/request'

// 查询列表
export function List(query) {
  return request({
    url: '/news',
    method: 'get',
    params: query
  })
}


// 新增
export function Add(data) {
  return request({
    url: '/news',
    method: 'post',
    data: data
  })
}

// 详细
export function Show(id) {
  return request({
    url: '/news/' +id,
    method: 'get'
  })
}

// 修改
export function Update(data) {
  return request({
    url: '/news/'+data.id,
    method: 'put',
    data: data
  })
}

// 删除
export function Delete(id) {
  return request({
    url: '/news/' + id,
    method: 'delete'
  })
}
